package scwrapper;

import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.30.0)",
    comments = "Source: sc.proto")
public final class SCWrapperGrpc {

  private SCWrapperGrpc() {}

  public static final String SERVICE_NAME = "scwrapper.SCWrapper";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.AccountRegisterReq,
      scwrapper.Sc.NoResp> getAccountRegisterMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "AccountRegister",
      requestType = scwrapper.Sc.AccountRegisterReq.class,
      responseType = scwrapper.Sc.NoResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.AccountRegisterReq,
      scwrapper.Sc.NoResp> getAccountRegisterMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.AccountRegisterReq, scwrapper.Sc.NoResp> getAccountRegisterMethod;
    if ((getAccountRegisterMethod = SCWrapperGrpc.getAccountRegisterMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getAccountRegisterMethod = SCWrapperGrpc.getAccountRegisterMethod) == null) {
          SCWrapperGrpc.getAccountRegisterMethod = getAccountRegisterMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.AccountRegisterReq, scwrapper.Sc.NoResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AccountRegister"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.AccountRegisterReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.NoResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("AccountRegister"))
              .build();
        }
      }
    }
    return getAccountRegisterMethod;
  }

  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.GetExchangeDetailReq,
      scwrapper.Sc.GetExchangeDetailResp> getGetExchangeDetailMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetExchangeDetail",
      requestType = scwrapper.Sc.GetExchangeDetailReq.class,
      responseType = scwrapper.Sc.GetExchangeDetailResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.GetExchangeDetailReq,
      scwrapper.Sc.GetExchangeDetailResp> getGetExchangeDetailMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.GetExchangeDetailReq, scwrapper.Sc.GetExchangeDetailResp> getGetExchangeDetailMethod;
    if ((getGetExchangeDetailMethod = SCWrapperGrpc.getGetExchangeDetailMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getGetExchangeDetailMethod = SCWrapperGrpc.getGetExchangeDetailMethod) == null) {
          SCWrapperGrpc.getGetExchangeDetailMethod = getGetExchangeDetailMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.GetExchangeDetailReq, scwrapper.Sc.GetExchangeDetailResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetExchangeDetail"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.GetExchangeDetailReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.GetExchangeDetailResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("GetExchangeDetail"))
              .build();
        }
      }
    }
    return getGetExchangeDetailMethod;
  }

  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.ApplyExchangeReq,
      scwrapper.Sc.NoResp> getApplyExchangeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "ApplyExchange",
      requestType = scwrapper.Sc.ApplyExchangeReq.class,
      responseType = scwrapper.Sc.NoResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.ApplyExchangeReq,
      scwrapper.Sc.NoResp> getApplyExchangeMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.ApplyExchangeReq, scwrapper.Sc.NoResp> getApplyExchangeMethod;
    if ((getApplyExchangeMethod = SCWrapperGrpc.getApplyExchangeMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getApplyExchangeMethod = SCWrapperGrpc.getApplyExchangeMethod) == null) {
          SCWrapperGrpc.getApplyExchangeMethod = getApplyExchangeMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.ApplyExchangeReq, scwrapper.Sc.NoResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyExchange"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.ApplyExchangeReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.NoResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("ApplyExchange"))
              .build();
        }
      }
    }
    return getApplyExchangeMethod;
  }

  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.GetOrderInfoReq,
      scwrapper.Sc.GetOrderInfoResp> getGetOrderInfoMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetOrderInfo",
      requestType = scwrapper.Sc.GetOrderInfoReq.class,
      responseType = scwrapper.Sc.GetOrderInfoResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.GetOrderInfoReq,
      scwrapper.Sc.GetOrderInfoResp> getGetOrderInfoMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.GetOrderInfoReq, scwrapper.Sc.GetOrderInfoResp> getGetOrderInfoMethod;
    if ((getGetOrderInfoMethod = SCWrapperGrpc.getGetOrderInfoMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getGetOrderInfoMethod = SCWrapperGrpc.getGetOrderInfoMethod) == null) {
          SCWrapperGrpc.getGetOrderInfoMethod = getGetOrderInfoMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.GetOrderInfoReq, scwrapper.Sc.GetOrderInfoResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetOrderInfo"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.GetOrderInfoReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.GetOrderInfoResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("GetOrderInfo"))
              .build();
        }
      }
    }
    return getGetOrderInfoMethod;
  }

  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.CommitKycReq,
      scwrapper.Sc.NoResp> getCommitKycMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "CommitKyc",
      requestType = scwrapper.Sc.CommitKycReq.class,
      responseType = scwrapper.Sc.NoResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.CommitKycReq,
      scwrapper.Sc.NoResp> getCommitKycMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.CommitKycReq, scwrapper.Sc.NoResp> getCommitKycMethod;
    if ((getCommitKycMethod = SCWrapperGrpc.getCommitKycMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getCommitKycMethod = SCWrapperGrpc.getCommitKycMethod) == null) {
          SCWrapperGrpc.getCommitKycMethod = getCommitKycMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.CommitKycReq, scwrapper.Sc.NoResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CommitKyc"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.CommitKycReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.NoResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("CommitKyc"))
              .build();
        }
      }
    }
    return getCommitKycMethod;
  }

  private static volatile io.grpc.MethodDescriptor<scwrapper.Sc.NoReq,
      scwrapper.Sc.GetKycResp> getGetKycMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetKyc",
      requestType = scwrapper.Sc.NoReq.class,
      responseType = scwrapper.Sc.GetKycResp.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<scwrapper.Sc.NoReq,
      scwrapper.Sc.GetKycResp> getGetKycMethod() {
    io.grpc.MethodDescriptor<scwrapper.Sc.NoReq, scwrapper.Sc.GetKycResp> getGetKycMethod;
    if ((getGetKycMethod = SCWrapperGrpc.getGetKycMethod) == null) {
      synchronized (SCWrapperGrpc.class) {
        if ((getGetKycMethod = SCWrapperGrpc.getGetKycMethod) == null) {
          SCWrapperGrpc.getGetKycMethod = getGetKycMethod =
              io.grpc.MethodDescriptor.<scwrapper.Sc.NoReq, scwrapper.Sc.GetKycResp>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetKyc"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.NoReq.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  scwrapper.Sc.GetKycResp.getDefaultInstance()))
              .setSchemaDescriptor(new SCWrapperMethodDescriptorSupplier("GetKyc"))
              .build();
        }
      }
    }
    return getGetKycMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static SCWrapperStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SCWrapperStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SCWrapperStub>() {
        @java.lang.Override
        public SCWrapperStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SCWrapperStub(channel, callOptions);
        }
      };
    return SCWrapperStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static SCWrapperBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SCWrapperBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SCWrapperBlockingStub>() {
        @java.lang.Override
        public SCWrapperBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SCWrapperBlockingStub(channel, callOptions);
        }
      };
    return SCWrapperBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static SCWrapperFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<SCWrapperFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<SCWrapperFutureStub>() {
        @java.lang.Override
        public SCWrapperFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new SCWrapperFutureStub(channel, callOptions);
        }
      };
    return SCWrapperFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class SCWrapperImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * 注册用户, 因每个用户需要做独立的aml等, 因此需要预先登记每个用户.
     * </pre>
     */
    public void accountRegister(scwrapper.Sc.AccountRegisterReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnimplementedUnaryCall(getAccountRegisterMethod(), responseObserver);
    }

    /**
     * <pre>
     * 获取铸销币的详情, 主要是汇率, 是否允许.
     * </pre>
     */
    public void getExchangeDetail(scwrapper.Sc.GetExchangeDetailReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetExchangeDetailResp> responseObserver) {
      asyncUnimplementedUnaryCall(getGetExchangeDetailMethod(), responseObserver);
    }

    /**
     * <pre>
     * 提交铸销币申请, header需要携带用户id.
     * </pre>
     */
    public void applyExchange(scwrapper.Sc.ApplyExchangeReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnimplementedUnaryCall(getApplyExchangeMethod(), responseObserver);
    }

    /**
     * <pre>
     * 查询订单详情, header携带用户id则查询该用户的, 不携带则查询全部用户的.
     * </pre>
     */
    public void getOrderInfo(scwrapper.Sc.GetOrderInfoReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetOrderInfoResp> responseObserver) {
      asyncUnimplementedUnaryCall(getGetOrderInfoMethod(), responseObserver);
    }

    /**
     * <pre>
     * 提交kyc信息, 再未提交kyc信息前, 不允许进行铸销币.
     * header需要携带用户id.
     * 目前提交的kyc信息直接通过, 不经过审核.
     * TODO: 如果可修改, 则系统会保存每次的修改.
     * </pre>
     */
    public void commitKyc(scwrapper.Sc.CommitKycReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnimplementedUnaryCall(getCommitKycMethod(), responseObserver);
    }

    /**
     * <pre>
     * 获取当前用户的kyc信息, header需要携带用户id.
     * </pre>
     */
    public void getKyc(scwrapper.Sc.NoReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetKycResp> responseObserver) {
      asyncUnimplementedUnaryCall(getGetKycMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getAccountRegisterMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.AccountRegisterReq,
                scwrapper.Sc.NoResp>(
                  this, METHODID_ACCOUNT_REGISTER)))
          .addMethod(
            getGetExchangeDetailMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.GetExchangeDetailReq,
                scwrapper.Sc.GetExchangeDetailResp>(
                  this, METHODID_GET_EXCHANGE_DETAIL)))
          .addMethod(
            getApplyExchangeMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.ApplyExchangeReq,
                scwrapper.Sc.NoResp>(
                  this, METHODID_APPLY_EXCHANGE)))
          .addMethod(
            getGetOrderInfoMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.GetOrderInfoReq,
                scwrapper.Sc.GetOrderInfoResp>(
                  this, METHODID_GET_ORDER_INFO)))
          .addMethod(
            getCommitKycMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.CommitKycReq,
                scwrapper.Sc.NoResp>(
                  this, METHODID_COMMIT_KYC)))
          .addMethod(
            getGetKycMethod(),
            asyncUnaryCall(
              new MethodHandlers<
                scwrapper.Sc.NoReq,
                scwrapper.Sc.GetKycResp>(
                  this, METHODID_GET_KYC)))
          .build();
    }
  }

  /**
   */
  public static final class SCWrapperStub extends io.grpc.stub.AbstractAsyncStub<SCWrapperStub> {
    private SCWrapperStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SCWrapperStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SCWrapperStub(channel, callOptions);
    }

    /**
     * <pre>
     * 注册用户, 因每个用户需要做独立的aml等, 因此需要预先登记每个用户.
     * </pre>
     */
    public void accountRegister(scwrapper.Sc.AccountRegisterReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getAccountRegisterMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 获取铸销币的详情, 主要是汇率, 是否允许.
     * </pre>
     */
    public void getExchangeDetail(scwrapper.Sc.GetExchangeDetailReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetExchangeDetailResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetExchangeDetailMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 提交铸销币申请, header需要携带用户id.
     * </pre>
     */
    public void applyExchange(scwrapper.Sc.ApplyExchangeReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getApplyExchangeMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 查询订单详情, header携带用户id则查询该用户的, 不携带则查询全部用户的.
     * </pre>
     */
    public void getOrderInfo(scwrapper.Sc.GetOrderInfoReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetOrderInfoResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetOrderInfoMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 提交kyc信息, 再未提交kyc信息前, 不允许进行铸销币.
     * header需要携带用户id.
     * 目前提交的kyc信息直接通过, 不经过审核.
     * TODO: 如果可修改, 则系统会保存每次的修改.
     * </pre>
     */
    public void commitKyc(scwrapper.Sc.CommitKycReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getCommitKycMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 获取当前用户的kyc信息, header需要携带用户id.
     * </pre>
     */
    public void getKyc(scwrapper.Sc.NoReq request,
        io.grpc.stub.StreamObserver<scwrapper.Sc.GetKycResp> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(getGetKycMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class SCWrapperBlockingStub extends io.grpc.stub.AbstractBlockingStub<SCWrapperBlockingStub> {
    private SCWrapperBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SCWrapperBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SCWrapperBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * 注册用户, 因每个用户需要做独立的aml等, 因此需要预先登记每个用户.
     * </pre>
     */
    public scwrapper.Sc.NoResp accountRegister(scwrapper.Sc.AccountRegisterReq request) {
      return blockingUnaryCall(
          getChannel(), getAccountRegisterMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 获取铸销币的详情, 主要是汇率, 是否允许.
     * </pre>
     */
    public scwrapper.Sc.GetExchangeDetailResp getExchangeDetail(scwrapper.Sc.GetExchangeDetailReq request) {
      return blockingUnaryCall(
          getChannel(), getGetExchangeDetailMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 提交铸销币申请, header需要携带用户id.
     * </pre>
     */
    public scwrapper.Sc.NoResp applyExchange(scwrapper.Sc.ApplyExchangeReq request) {
      return blockingUnaryCall(
          getChannel(), getApplyExchangeMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 查询订单详情, header携带用户id则查询该用户的, 不携带则查询全部用户的.
     * </pre>
     */
    public scwrapper.Sc.GetOrderInfoResp getOrderInfo(scwrapper.Sc.GetOrderInfoReq request) {
      return blockingUnaryCall(
          getChannel(), getGetOrderInfoMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 提交kyc信息, 再未提交kyc信息前, 不允许进行铸销币.
     * header需要携带用户id.
     * 目前提交的kyc信息直接通过, 不经过审核.
     * TODO: 如果可修改, 则系统会保存每次的修改.
     * </pre>
     */
    public scwrapper.Sc.NoResp commitKyc(scwrapper.Sc.CommitKycReq request) {
      return blockingUnaryCall(
          getChannel(), getCommitKycMethod(), getCallOptions(), request);
    }

    /**
     * <pre>
     * 获取当前用户的kyc信息, header需要携带用户id.
     * </pre>
     */
    public scwrapper.Sc.GetKycResp getKyc(scwrapper.Sc.NoReq request) {
      return blockingUnaryCall(
          getChannel(), getGetKycMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class SCWrapperFutureStub extends io.grpc.stub.AbstractFutureStub<SCWrapperFutureStub> {
    private SCWrapperFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected SCWrapperFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new SCWrapperFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * 注册用户, 因每个用户需要做独立的aml等, 因此需要预先登记每个用户.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.NoResp> accountRegister(
        scwrapper.Sc.AccountRegisterReq request) {
      return futureUnaryCall(
          getChannel().newCall(getAccountRegisterMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 获取铸销币的详情, 主要是汇率, 是否允许.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.GetExchangeDetailResp> getExchangeDetail(
        scwrapper.Sc.GetExchangeDetailReq request) {
      return futureUnaryCall(
          getChannel().newCall(getGetExchangeDetailMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 提交铸销币申请, header需要携带用户id.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.NoResp> applyExchange(
        scwrapper.Sc.ApplyExchangeReq request) {
      return futureUnaryCall(
          getChannel().newCall(getApplyExchangeMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 查询订单详情, header携带用户id则查询该用户的, 不携带则查询全部用户的.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.GetOrderInfoResp> getOrderInfo(
        scwrapper.Sc.GetOrderInfoReq request) {
      return futureUnaryCall(
          getChannel().newCall(getGetOrderInfoMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 提交kyc信息, 再未提交kyc信息前, 不允许进行铸销币.
     * header需要携带用户id.
     * 目前提交的kyc信息直接通过, 不经过审核.
     * TODO: 如果可修改, 则系统会保存每次的修改.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.NoResp> commitKyc(
        scwrapper.Sc.CommitKycReq request) {
      return futureUnaryCall(
          getChannel().newCall(getCommitKycMethod(), getCallOptions()), request);
    }

    /**
     * <pre>
     * 获取当前用户的kyc信息, header需要携带用户id.
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<scwrapper.Sc.GetKycResp> getKyc(
        scwrapper.Sc.NoReq request) {
      return futureUnaryCall(
          getChannel().newCall(getGetKycMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_ACCOUNT_REGISTER = 0;
  private static final int METHODID_GET_EXCHANGE_DETAIL = 1;
  private static final int METHODID_APPLY_EXCHANGE = 2;
  private static final int METHODID_GET_ORDER_INFO = 3;
  private static final int METHODID_COMMIT_KYC = 4;
  private static final int METHODID_GET_KYC = 5;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final SCWrapperImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(SCWrapperImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_ACCOUNT_REGISTER:
          serviceImpl.accountRegister((scwrapper.Sc.AccountRegisterReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp>) responseObserver);
          break;
        case METHODID_GET_EXCHANGE_DETAIL:
          serviceImpl.getExchangeDetail((scwrapper.Sc.GetExchangeDetailReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.GetExchangeDetailResp>) responseObserver);
          break;
        case METHODID_APPLY_EXCHANGE:
          serviceImpl.applyExchange((scwrapper.Sc.ApplyExchangeReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp>) responseObserver);
          break;
        case METHODID_GET_ORDER_INFO:
          serviceImpl.getOrderInfo((scwrapper.Sc.GetOrderInfoReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.GetOrderInfoResp>) responseObserver);
          break;
        case METHODID_COMMIT_KYC:
          serviceImpl.commitKyc((scwrapper.Sc.CommitKycReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.NoResp>) responseObserver);
          break;
        case METHODID_GET_KYC:
          serviceImpl.getKyc((scwrapper.Sc.NoReq) request,
              (io.grpc.stub.StreamObserver<scwrapper.Sc.GetKycResp>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class SCWrapperBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    SCWrapperBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return scwrapper.Sc.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("SCWrapper");
    }
  }

  private static final class SCWrapperFileDescriptorSupplier
      extends SCWrapperBaseDescriptorSupplier {
    SCWrapperFileDescriptorSupplier() {}
  }

  private static final class SCWrapperMethodDescriptorSupplier
      extends SCWrapperBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    SCWrapperMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (SCWrapperGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new SCWrapperFileDescriptorSupplier())
              .addMethod(getAccountRegisterMethod())
              .addMethod(getGetExchangeDetailMethod())
              .addMethod(getApplyExchangeMethod())
              .addMethod(getGetOrderInfoMethod())
              .addMethod(getCommitKycMethod())
              .addMethod(getGetKycMethod())
              .build();
        }
      }
    }
    return result;
  }
}
